package com.ruoyi.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SupplierOrderMapper;
import com.ruoyi.system.domain.SupplierOrder;
import com.ruoyi.system.service.ISupplierOrderService;
import org.springframework.web.bind.annotation.RequestBody;

import javax.annotation.Resource;

/**
 * 供应商与订单关系Service业务层处理
 *
 * @author 协同
 * @date 2022-04-21
 */
@Service
public class SupplierOrderServiceImpl implements ISupplierOrderService {
    @Resource
    private SupplierOrderMapper supplierOrderMapper;

    /**
     * 查询供应商与订单关系
     *
     * @param id 供应商与订单关系主键
     * @return 供应商与订单关系
     */
    @Override
    public SupplierOrder selectSupplierOrderById(Long id) {
        return supplierOrderMapper.selectSupplierOrderById(id);
    }

    /**
     * 查询供应商与订单关系列表
     *
     * @param supplierOrder 供应商与订单关系
     * @return 供应商与订单关系
     */
    @Override
    public List<SupplierOrder> selectSupplierOrderList(SupplierOrder supplierOrder) {
        return supplierOrderMapper.selectSupplierOrderList(supplierOrder);
    }

    /**
     * 新增供应商与订单关系
     *
     * @param supplierOrder 供应商与订单关系
     * @return 结果
     */
    @Override
    public int insertSupplierOrder(SupplierOrder supplierOrder) {
        return supplierOrderMapper.insertSupplierOrder(supplierOrder);
    }

    /**
     * 修改供应商与订单关系
     *
     * @param supplierOrder 供应商与订单关系
     * @return 结果
     */
    @Override
    public int updateSupplierOrder(SupplierOrder supplierOrder) {
        return supplierOrderMapper.updateSupplierOrder(supplierOrder);
    }

    /**
     * 批量删除供应商与订单关系
     *
     * @param ids 需要删除的供应商与订单关系主键
     * @return 结果
     */
    @Override
    public int deleteSupplierOrderByIds(Long[] ids) {
        return supplierOrderMapper.deleteSupplierOrderByIds(ids);
    }

    /**
     * 删除供应商与订单关系信息
     *
     * @param id 供应商与订单关系主键
     * @return 结果
     */
    @Override
    public int deleteSupplierOrderById(Long id) {
        return supplierOrderMapper.deleteSupplierOrderById(id);
    }
}
